-- GENERATED SPELL FOR [Salranax the Flesh Render] --


function spell0_30829(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(15244,pUnit)
pUnit:RegisterEvent('Sorts_30829', 8289, 1)
end

function spell1_30829(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(15122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30829', 15349, 1)
end

function spell2_30829(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30829', 3000, 1)
end

function spell3_30829(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(18100,pUnit)
pUnit:RegisterEvent('Sorts_30829', 0, 1)
end

function Sorts_30829(pUnit, Event)
local choix_sorts_30829 = math.random(0, 3)
if choix_sorts_30829 == 0 then
pUnit:RegisterEvent('spell0_30829', 1, 1)
end
if choix_sorts_30829 == 1 then
pUnit:RegisterEvent('spell1_30829', 1, 1)
end
if choix_sorts_30829 == 2 then
pUnit:RegisterEvent('spell2_30829', 1, 1)
end
if choix_sorts_30829 == 3 then
pUnit:RegisterEvent('spell3_30829', 1, 1)
end
end

function mob30829_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30829', math.random(1500, 3000), 1)
end

function mob30829_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30829_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30829_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30829, 1, 'mob30829_Action')
RegisterUnitEvent(30829, 2, 'mob30829_Leave')
RegisterUnitEvent(30829, 3, 'mob30829_Kill')
RegisterUnitEvent(30829, 4, 'mob30829_Die')
